<template>
  <div>
    <div ref="myChart" style="height:400px" />
  </div>
</template>

<script>
// 引入库
import * as echarts from 'echarts'
export default {
  mounted() {
    // 初始化实例
    const myChart = echarts.init(this.$refs.myChart)
    // 创建配置对象 options
    const options = {
      textStyle: {
        fontSize: 14
      },
      color: ['#0000ff', '#00ff00'],
      radar: {
        indicator: [
          { name: '销售', max: 6500 },
          { name: '管理', max: 16000 },
          { name: '技术', max: 30000 },
          { name: '售后', max: 38000 },
          { name: '开发', max: 52000 },
          { name: '营销', max: 25000 }
        ]
      },
      series: [
        {
          name: 'Budget vs spending',
          type: 'radar',
          data: [{
            value: [4200, 3000, 12000, 35000, 50000, 18000],
            name: 'Allocated Budget'
          },
          {
            value: [5000, 14000, 28000, 26000, 42000, 21000],
            name: 'Actual Spending'
          }]
        }
      ]
    }
    myChart.setOption(options)
  }
}
</script>

<style>

</style>
